
/// 返回 ctrl + 参数c 的按键 ASCII
///
/// # 参数
/// * 'c' - 要转换成 ctrl 的组合键按键
///
/// # 返回值
/// ctrl + 参数c 的按键 ASCII
///
/// # 示例
/// ```
/// let ctrl_q = to_ctrl_byte('q');
/// assert_eq!(ctrl_q, 17);
/// ```
fn to_ctrl_byte(c: char) -> u8 {
    let byte = c as u8;
    // ctrl + q == 31
    byte & 0b0001_1111
}